define(['common/util/asserts'], function(asserts) {

var string = {};

string.removeSuffix = function(str, suffix) {
  asserts.assert(string.endsWith(str, suffix));
  return str.slice(0, -suffix.length);
};

string.beginsWith = function(str, prefix) {
  return str.substring(0, prefix.length) == prefix;
};

string.endsWith = function(str, suffix) {
  return str.indexOf(suffix, str.length - suffix.length) !== -1;
};

return string;

});
